Skip to content

Hotfix torch dependency#424

Merged
johnwalz97 merged 4 commits intoprodfrom
hotfix-torch-dependency
Sep 11, 2025
Merged

Hotfix torch dependency#424
johnwalz97 merged 4 commits intoprodfrom
hotfix-torch-dependency

Conversation

@johnwalz97
Copy link
Contributor

@johnwalz97 johnwalz97 commented Sep 11, 2025

Pull Request Description

What and why?

Hotfix for torch import that causes import validmind to fail when only core dependencies are installed.

How to test

What needs special review?

Dependencies, breaking changes, and deployment notes

Release notes

Checklist

  • What and why
  • Screenshots or videos (Frontend)
  • How to test
  • What needs special review
  • Dependencies, breaking changes, and deployment notes
  • Labels applied
  • PR linked to Shortcut
  • Unit tests added (Backend)
  • Tested locally
  • Documentation updated (if required)
  • Environment variable additions/changes documented (if required)

@github-actions
Copy link
Contributor

PR Summary

This PR introduces a change to how the torch library is imported in the client module. Instead of a direct import, the torch import is wrapped in a try/except block. If importing torch fails for any reason, the variable is set to None. This adjustment makes the module more resilient in environments where torch might not be installed without breaking the rest of the application.

Additionally, version increments in the project files ensure consistency across the version declarations, aligning the project version between documentation and runtime but these version changes are not the primary focus of this PR.

Test Suggestions

  • Verify that the client module functions normally when torch is not installed by simulating an ImportError.
  • Test that when torch is available, it is imported and used correctly within the client module.
  • Ensure that any subsequent accesses to torch in the application handle the case when torch is None, avoiding runtime errors.

@johnwalz97 johnwalz97 added bug Something isn't working internal Not to be externalized in the release notes labels Sep 11, 2025
@johnwalz97 johnwalz97 merged commit c27bb21 into prod Sep 11, 2025
19 of 20 checks passed
@johnwalz97 johnwalz97 deleted the hotfix-torch-dependency branch September 11, 2025 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working internal Not to be externalized in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants